package data.board;

public class Chessboard {
	private final Square[][] squares;
	
	public Chessboard(){
		super();
		
		squares = new Square[8][8];
		for(int x = 0; x < 8; x++){
			for(int y = 0; y < 8; y++){
				squares[x][y] = new Square(x, y);
			}
		}
	}
	
	public static void main(String[] args) {
		Chessboard c = new Chessboard();
		
		for(Square[] row : c.getSquares()){
			for(Square s : row){
				System.out.print(s.getCoordinates() + " " + s.getColor() + " ");
			}
			System.out.println();
		}
	}

	public Square get(int x, int y){
		return squares[x][y];
	}
	
	public Square[][] getSquares() {
		return squares;
	}
}
